<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    a{
      width: 300px;
      height: 100px;
      transform-style: preserve-3d;
      transition: 4s;
      position: relative;
      margin: 500px auto;
      display: block;
      transform: perspective(1000px) rotateX(0deg)
    }
    a span{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      text-align: center;
      line-height: 100px;
      color: #000;
      background: rgba(255,255,255,.9);
      font-size: 22px;
      transition: .5s;
      border: 2px solid #000;
      box-sizing: border-box;
      box-shadow: inset 0 20px 50px rgba(0,0,0,.2);

    }
    a:hover span{
      color: #fff;
      background: rgba(3,169,244,.8);
    }
    a span:nth-child(1){
      transform: rotateX(360deg) translateZ(50px);
    }
    a span:nth-child(2){
      transform: rotateX(270deg) translateZ(50px);
    }
    a span:nth-child(3){
      transform: rotateX(180deg) translateZ(50px);
    }
    a span:nth-child(4){
      transform: rotateX(90deg) translateZ(50px);
    }
    a:hover{
      transform: perspective(1000px) rotateX(360deg);
    }
    a{
      /*box-shadow: 0px 20px 30px #ccc;*/
    }
  </style>
</head>
<body>
  <a href="">
    <span>button</span>
    <span>button</span>
    <span>button</span>
    <span>button</span>
  </a>
</body>
</html>